This Notebook Covers:

Lesson 2A-L3 Linearity and Convolution


In [1]:
import cv2
import os
import matplotlib.pyplot as plt
from ps0 import *
import numpy as np
%matplotlib inline

In [2]:
driver_path = 'input/ps0-1-a-1.jpg'

driver = cv2.imread(driver_path)
show_img(driver)



In [18]:
driver_blur = cv2.GaussianBlur(driver, (7,7), 3, borderType=2)

In [19]:
show_img(driver_blur)


Apply a median filter

Add salt & pepper noise


In [21]:
grid = np.random.normal(0,0.4,driver.shape)
grid = grid.astype('uint8')
driver_salt_pepper = cv2.add(driver, grid)

In [ ]: